//
//  HSYBaseMoveNavigationController.m
//  高仿暴走斗图
//
//  Created by key on 16/3/21.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "HSYBaseMoveNavigationController.h"
#import "UINavigationBar+customBar.h"

@implementation HSYBaseMoveNavigationController

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
    
    if (self = [super initWithRootViewController:rootViewController]) {
        
        [self setTransitionsAnimationType:kHSYTransitionsAnimationTypeMove withBarColor:[[HSYColorHelper shareInstance] navBarColor]];
    }
    return self;
}

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        
        [self setTransitionsAnimationType:kHSYTransitionsAnimationTypeMove withBarColor:[[HSYColorHelper shareInstance] navBarColor]];
    }
    return self;
}

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.showsShadow = YES;
}

- (void)setClearColorNavigationBar {
    
    UIView *alphaView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.navigationBar.viewWidth, self.navigationBar.viewHeight)];
    self.navigationBarColor = CLEAR_COLOR;
    alphaView.backgroundColor = self.navigationBarColor;
    alphaView.alpha = 0.0f;
    [self.view insertSubview:alphaView belowSubview:self.navigationBar];                //插入假view作为颜色    
}

@end
